refactored server, organized folders and files