add composer. fix tests and autoloading