Modified everything to work a little better