Implemented STI and cleaned up tests