Implement a basic OTP like abstraction