Added testing code in the main file.