Merged Jackon's changes
Made dosing a resource
Fixed factor type