Changed Architecture.
Fixed some errors.
Move everything in classes.