less stupid file dependancies and some cleanup