fixed layout, cleaned code up