added more implementation, bug fixes, and sanitized all paths on server