cleaned up directories. refactored http requests