Fixed a few more bugs. More to go. Looks like I have to fix attributes before continuing.