Simplified the stored procedured codes.