Made code more domain agnostic