Refactor app packages. Move handling os views to fragment class.