some basic cleaning

linq, trying to get rid of the keys and messy such, file accessor and
tests