Factory

@BullShark @projektile @n0per @BinaryStroke @teslasolution 

Review code.

This is just an example of pull requesting, please don't actually merge this code as it would break a lot of features.