Added debug flag for when building in debug
Implemented behaviour test for script
Fullfill behaviour test for scripts