ported v0.3 stubgenerator into dev branch. Lot's of stuff not working
right now.