Php4 compatibility + some other littele features