Testing is functional

Lots of small fixes and changes to make everything functional