Handling concurrency and implementing inheritance