worked on config and application loader

also made the layout class better