minor reformatting and move to sdpy