Refactored the ApiHandler class, and added the public folder.