remove debug logs, add comments and other fixes
rename main server file