Code added

All source and headers required for the provided main.cpp.