Merge manual changes from server + some whitespace cleanup