Module deployment API - fixes #2