Added basic schematic support (fix #2) and fixed some script issues

accidentally formatted some code, sorry