short -> int
Fixed a bug in the return type of has_empty.
Moving the static variables to a direction enum.
Removing reference.