Back-end code optimized with JSHint + small fix for the update version comparision