Key repeats + levels + code cleanup / small rewrite