Added nested attribute to MLP class and some checks