Converted some datadecls to newtypes, added some pedantic alignment, cleaned up some case matching code