new layout of the code, experimenting with less convoluted classes