removed duplicate function
resolved many bugs
added index file for indexes plugin