Removed dynamic file loading, buggy and not really needed.

Updated several JavaScript files, mainly moving stuff around.

Added alert(), alias to dialogs.alert()