Compile class with __init__ and method