refactored layout and style implementation.