Cleanup of DOAP class

Just fixed some issues, made it more efficient, removed unnecessary code
and proper permissions implemented