layout logic refactored, panel module added, console module refactored