Nawqaan 209

Although it looks 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.
I should probably fix these since there are many.