Added some more definitions and removing dead cruft