cleaned up code and implemented bootstrap