Update: Organised source code to make it more neat.