Some Code improvments

Just fixed a Bug NFO couldn't be found at search.
Some Code redesign.