clean whitespace
prevent default behaviour when pressing up key or down key

closes #218