@Abdul: I honestly write these things mostly for my future self and didn't think anyone would actually read it, but will have a look whenever I get a chance, also I've got better approaches now since when I wrote this post.