JavaScript inheritance module