working on layout and code cleanup