Removed debug code and Apache license