Added doc files and change run() structure