Code Cleanup

Made changes suggested by Thomas Wilburn.