Added a document about target structure
For easier readability, separated functions from __main__
Space
Typo fixing
Updated with import for __main__