fixed minor bugs, improved layout