moved some stuff a little higher on the page
make sure focus is grabbed at the correct times
added some debugging information to paint routine