Added missing implementation, fixed lint errors and most warnings