Added a proper module structure (useful for anyone with nontrivial requirements).