Moved layout to own class
Reformat code