updated comments. almost forgot what some parts did
added search index