Begin cleanup of code to match online