Seperate state management to a unique profile; add test cases