Fixed duplicate project check logic.
Improved test coverage for device, profile and project APIs.