Cleaning up

Final version available at http://jsfiddle.net/saritmishra/V4j6z/