Simple ajax module written in native javascript