Removed unused "pos" variable
Added variables for changing oscillating values
Fixed oscillating out of bounds bug