Added unit test files, and reformulated empties function.