This commit contains a lot of basic fixes (basic string stuff, that couldn't be tested without a working server before) and adds debug messages.
Added basic functionality