more subclass work
cleanp class methods, added state variables and implemented writeVal
merged gpio-subclass work back into master