Initial commit containing first implementation and some comments. Need some more comments describing the functions themselves