M4 update

@scarygami can you give this a review and try it out?