Adding profile controller functions and very basic tests