Fixed bug, improved readability