Re-organised without usning Flask, made all classes extend object