Further refactored to add useraccount context