fix bugs, cleanup layout, cleanup code, implement print