Nawqaan 209

Although it look like main.js changed completely, it's only because I removed the spaces and replaced with tabs. Real new code is from line 104 to 118.