fixed a critical bug, improved application flow, removed _ prefix from all variables