Fixed scale hard coding

Added variables for scale factors instead of hard coded values.