Misc code cleaning (see issue #1)