Move Main to its own package; separate classes

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>