fix a few memory leak
1. restructure code
2. change reused view a lot
3. add new home view