API decouple and improvements

Good luck...