Functional version using a Frame Class. Not ready for production yet