Cleaned up code, removed hardcoded server_dir.