Improved implementation of classes + compatibility
Fixed indentetion