Merged the two main methods into one.
Also update the documentation to match the desired coding style.
Removed an unnecessary newline
Added support for 0 and 1.
Added a special case to make factorising 0 and 1 valid operations.
Updated the writeup for the assignment