Splitted imports into groups.
Formatted JS code.
Added comments for important blocks of code.