Refactor, persistence, error checking

Signed-off-by: ozanturgut@gmail.com <ozanturgut@gmail.com>
Added dist folder

Signed-off-by: ozanturgut@gmail.com <ozanturgut@gmail.com>