Fixed the action bar and continued refactoring