split tests into their file
random improvements
using mocha for tests
fixed dynamic inheritance bug