Fix lib location and some cleanup