Refactoring and static files setup