Cleaned up my code and added curForm variable to Form