Implemented findPrefix and removePrefix