fixed speeling errors, error checking and added support for templating src- and href-tags