a lot of old code deletion, closes #43, fixes #37