Fixes type system to remove hack - NOT DONE