Fix enhancement #1, do some major code orginization