Fix removeFeature bug + some cleanup