Augmented lib/main and added tests for the same.