Minor refactoring

Mainly replaced the 'main' function with boot test suite.