Fix display issues and do code improvements

Fix #15 and do some code improvements and remove dirty hacks