Separate modules, tweaks and fixes