added SQL
added some schemas
small code cleanup