added config.txt and configuration method, refactored some server code, changed some styles