Scalagen library