Templates and library for 8051