Some testing

Tested the class with the MockProfileSource class and found some big errors and fixed them