Normalize and better prediction code