Lots of updates. Added UI Code.