Optimized code and added "ticks" property to config