Merged RMM code into a single .c and .h files
Improving documentation, coding structure