updated schema to reflect the currently used version
fixed minor bugs

no more deprecation
checking for adequate need type now works
changed some variable names