generalized UI layout for variable-sized screens
code cleanup, got rid of compiler warnings