Division into classes

Added separate classes and headers