Improved code

Simplified some paths
Added comments