feat: adapt code to LS conventions, minor refactors