improvements and debugging layout