fixed out of bound checks for constants

* invalid values for constants will display a friendly error
* limtied Cd to 0 to 1 when using scroll/swipe feature
* turned off auto complete for constants
removed unnessary whitespaces