Removed inheritance and replaced variable definitions