Added implementation for the basic exercises.