Studying the Machine Learning Lifecycle and Improving Code Quality of Machine Learning Applications