Error handling and organising for the Classes