lots of fixes and new files, beginning to link everything together