Reworked class calls so that they work on the right layer