Created table indexes, fixed SELECT/INSERT queries