Movable boxes plus some refactoring