Bug- and lint fixes, naming cleanup