Removed test code from main