Re-add cursor locking and centering, refactor some variable names