Added a size param to the crop function.
Moved phase creation to the library.