Moved main to lib dir