Fixed various errors in test queries/adjusted syntax
Added structs and fixed nested constructors