Php stuff and some style changes