Improve code extraction based on #11

Would be great to have some code review here. The `extractCode` function is a "mini" parser that just can parse strings and comments. 
//cc @HugoGiraudel @valeriangalliat