Fixed table references
Moved classes
Updated test files and schema