Added file[] usage
Optimized schema according to necessary table size
Modified functions and prepared for future implementations