upload function fixed, database integration, style adjusted, minor changes