Removed abstraction
Removing obsolete code
Fixed ref errors, removed unused stuff