Fixed some lint errors
Added and fixed tests