Everything done but need to add exception handling and memory
management.