Fixed strict bug
Improved BASE_URL handling (for running under different directory than /)