Cleaned up code, added comments - A++ for us.