Added tests and lint fixes