Fix compilation errors & first attempt of cleaning

Change-Id: I0b59c5bd0621a06be4a3feb57a3940ced3d7b4ca