Fix user inteface, remove code duplications
Check library name with startsWith instead of contains