Incremented version number
Added complex constraints and better javascript