Back buttons works and more refactoring