refactored webspace key and language code
added phpdoc