MINOR cleaned code and removed some warnings