Update code

Add hard-code constant values
Simplify algorithm for the movings
Take into consideration the new class/enumeration Element