Some not so functional code and tests