initial version
fixed size of movement boundaries; small code cleanup