Removed function; fixed DOM handling; format fixes