Rewrite + Closed Issues #1, #6 and #7