Proper directory structure, final code refactor