Replace jQuery spaghetti with Knockout.