Fixing dependency and compilation problems