Cleaned up code.Improved permissions.