Explicit type passing to build move tables
Modularizing current code