Tweaked up some parts & added comments