Moving factors into their own .py file

Few small tweaks to documentation.