minor cleanup and auto adjust light precision