Implemented all functions... doubting the quality of the implementation....

.....