Based on Seqant and mg-boilerplate