compilation fixes and intermediate commit