Added majority of the functionality. Added jQuery UI stuff.