updated classes and changed code structure

updated classes and changed code structure in v0.3