Adding more functionality to main layout