Few fixes to build data
Add some environment functions, start a small test on data